package com.xr.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import java.util.Date;

@RestController
public class HelloController {
    @RequestMapping("hello")
    public ModelAndView hello(ModelAndView modelAndView){
        modelAndView.addObject("nowDate",new Date());
        modelAndView.setViewName("/WEB-INF/jsp/hello.jsp");
        return modelAndView;
    }
}
